home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / Chip Temmuz 2004.iso / program / antispam / RazorAgent_SDK / razor-agents-sdk-2.03.exe / URI-1.19 / t / escape.t < prev    next >
Encoding:
Text File  |  2001-10-27  |  564 b   |  27 lines

  1. print "1..6\n";
  2.  
  3. use URI::Escape;
  4.  
  5. print "not " unless uri_escape("|abcσ") eq "%7Cabc%E5";
  6. print "ok 1\n";
  7.  
  8. print "not " unless uri_escape("abc", "b-d") eq "a%62%63";
  9. print "ok 2\n";
  10.  
  11. print "not " if defined(uri_escape(undef));
  12. print "ok 3\n";
  13.  
  14. print "not " unless uri_unescape("%7Cabc%e5") eq "|abcσ";
  15. print "ok 4\n";
  16.  
  17. print "not " unless join(":", uri_unescape("%40A%42", "CDE", "F%47H")) eq
  18.                     '@AB:CDE:FGH';
  19. print "ok 5\n";
  20.  
  21.  
  22.  
  23. use URI::Escape qw(%escapes);
  24.  
  25. print "not" unless $escapes{"%"} eq "%25";
  26. print "ok 6\n";
  27.